.class public final Lnbisdk/gz;
.super Ljava/lang/Object;

# interfaces
.implements Lnbisdk/hi;


# static fields
.field private static kb:Lnbisdk/gz;


# instance fields
.field private ca:Lcom/nbi/common/NBIContext;

.field private kc:Lnbisdk/qk;

.field private kd:Lnbisdk/ge;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x0

    sput-object v0, Lnbisdk/gz;->kb:Lnbisdk/gz;

    return-void
.end method

.method private constructor <init>(Lcom/nbi/common/NBIContext;)V
    .locals 2

    const/4 v1, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object v1, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    new-instance v0, Lnbisdk/ge;

    invoke-direct {v0}, Lnbisdk/ge;-><init>()V

    iput-object v0, p0, Lnbisdk/gz;->kd:Lnbisdk/ge;

    iput-object v1, p0, Lnbisdk/gz;->ca:Lcom/nbi/common/NBIContext;

    :try_start_0
    iput-object p1, p0, Lnbisdk/gz;->ca:Lcom/nbi/common/NBIContext;

    invoke-direct {p0, p1}, Lnbisdk/gz;->g(Lcom/nbi/common/NBIContext;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public static f(Lcom/nbi/common/NBIContext;)Lnbisdk/gz;
    .locals 1

    sget-object v0, Lnbisdk/gz;->kb:Lnbisdk/gz;

    if-nez v0, :cond_1

    new-instance v0, Lnbisdk/gz;

    invoke-direct {v0, p0}, Lnbisdk/gz;-><init>(Lcom/nbi/common/NBIContext;)V

    sput-object v0, Lnbisdk/gz;->kb:Lnbisdk/gz;

    :cond_0
    :goto_0
    sget-object v0, Lnbisdk/gz;->kb:Lnbisdk/gz;

    return-object v0

    :cond_1
    if-eqz p0, :cond_0

    sget-object v0, Lnbisdk/gz;->kb:Lnbisdk/gz;

    invoke-direct {v0, p0}, Lnbisdk/gz;->g(Lcom/nbi/common/NBIContext;)V

    goto :goto_0
.end method

.method private g(Lcom/nbi/common/NBIContext;)V
    .locals 2

    const/4 v1, 0x7

    iput-object p1, p0, Lnbisdk/gz;->ca:Lcom/nbi/common/NBIContext;

    :try_start_0
    iget-object v0, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    if-nez v0, :cond_0

    sget-object v0, Landroid/os/Build$VERSION;->SDK:Ljava/lang/String;

    invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    if-ge v0, v1, :cond_2

    const-string v0, "com.nbi.location.android.AndroidCellTowerInfoProvider_API_5"

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/qk;

    :goto_0
    iput-object v0, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    :cond_0
    iget-object v0, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/gz;->ca:Lcom/nbi/common/NBIContext;

    invoke-virtual {v0}, Lcom/nbi/common/NBIContext;->getInternalObject()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/bl;

    if-eqz v0, :cond_1

    iget-object v1, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    invoke-virtual {v0}, Lnbisdk/bl;->jw()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v1, v0}, Lnbisdk/qk;->c(Landroid/content/Context;)Z

    :cond_1
    :goto_1
    return-void

    :cond_2
    if-lt v0, v1, :cond_3

    const-string v0, "nbisdk.gx"

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/qk;

    goto :goto_0

    :cond_3
    new-instance v0, Ljava/lang/ClassNotFoundException;

    invoke-direct {v0}, Ljava/lang/ClassNotFoundException;-><init>()V

    throw v0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1
.end method


# virtual methods
.method public final c(Lcom/nbi/location/Location;)V
    .locals 1

    iget-object v0, p0, Lnbisdk/gz;->kd:Lnbisdk/ge;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/gz;->kd:Lnbisdk/ge;

    invoke-virtual {v0, p1}, Lnbisdk/ge;->b(Lcom/nbi/location/Location;)V

    :cond_0
    return-void
.end method

.method public final destroy()V
    .locals 1

    iget-object v0, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    invoke-virtual {v0}, Lnbisdk/qk;->destroy()V

    :cond_0
    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    return-void
.end method

.method public final fu()I
    .locals 1

    iget-object v0, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    invoke-virtual {v0}, Lnbisdk/qk;->eu()I

    move-result v0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public final fv()Lnbisdk/ge;
    .locals 1

    iget-object v0, p0, Lnbisdk/gz;->kd:Lnbisdk/ge;

    return-object v0
.end method

.method public final fw()V
    .locals 1

    iget-object v0, p0, Lnbisdk/gz;->kd:Lnbisdk/ge;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/gz;->kd:Lnbisdk/ge;

    invoke-virtual {v0}, Lnbisdk/ge;->clear()V

    :cond_0
    return-void
.end method

.method public final fx()Lnbisdk/qk;
    .locals 1

    iget-object v0, p0, Lnbisdk/gz;->kc:Lnbisdk/qk;

    return-object v0
.end method
